% fname: routing_oddeven__sel_random__topology_8x8__.m
% ./noxim -routing oddeven -sel random -dimx 8 -dimy 8  -sim 10000 -warmup 2000 -size 8 8 -buffer 8 -hs 6 0.2 -hs 7 0.2 -hs 14 0.2 -hs 15 0.2 

function [max_pir, max_throughput, min_delay] = routing_oddeven__sel_random__topology_8x8__(symbol)

data = [
%             pir      avg_delay     throughput      max_delay       rpackets         rflits
           0.0018        19.9613      0.0143492             83            904           7232
           0.0018        22.8935      0.0147857            177            930           7452
           0.0018        20.1867      0.0144754             79            884           7064
           0.0018        21.3518      0.0151109             84            938           7495
           0.0018        21.5636      0.0153158            120            873           6984
           0.0018        20.7562      0.0149012            109            923           7391
           0.0018        22.8448      0.0155184            123            947           7573
           0.0018        22.7128      0.0163708            160            982           7858
           0.0018        23.2239       0.015131            159            938           7505
           0.0018         22.513      0.0154083            127            924           7396
           0.0018        20.8678      0.0149008             89            938           7510
           0.0018         21.894      0.0152521            100            915           7321
           0.0018        20.0152      0.0140717             85            858           6867
           0.0018        22.8292      0.0156568            149            925           7390
           0.0018        20.0457       0.014373            100            876           7014
           0.0018        21.2569      0.0151167             93            907           7256
           0.0018        22.3177      0.0145734            126            919           7345
           0.0018        21.8628       0.015675            137            940           7524
           0.0018        21.2907      0.0146389             97            922           7378
           0.0018        23.5991      0.0146667            123            923           7392
           0.0019        22.1821      0.0156956             95            972           7785
           0.0019        22.6577      0.0163996            147            999           8003
           0.0019        22.7382      0.0161111             99           1016           8120
           0.0019        23.1723      0.0160258            113           1010           8077
           0.0019        23.3832      0.0165553            112           1010           8079
           0.0019        22.2233      0.0155302            156            963           7703
           0.0019        21.5957      0.0149294             98            925           7405
           0.0019        21.9968      0.0157625            155            945           7566
           0.0019        23.6125       0.015291            168            978           7829
           0.0019        23.4035      0.0150547            115            964           7708
           0.0019           23.2      0.0163375            157            980           7842
           0.0019        22.6695      0.0153176            145            935           7475
           0.0019         22.813      0.0149246            104            941           7522
           0.0019        22.7316      0.0166411             84           1032           8254
           0.0019        23.3609      0.0163468            106           1014           8108
           0.0019        24.7559       0.016371            155           1016           8120
           0.0019        21.6331      0.0156131             93            984           7869
           0.0019        23.7042      0.0162917            109            977           7820
           0.0019        23.5707      0.0156032            122            983           7864
           0.0019        22.9319      0.0161396            105            969           7747
            0.002        23.3858      0.0170141            114           1055           8439
            0.002        20.9652       0.015756             92            977           7815
            0.002        21.9296      0.0153611             92            966           7742
            0.002        21.2292      0.0168562            116           1012           8091
            0.002         22.751      0.0160806            119            996           7976
            0.002        23.2801      0.0159476            116            989           7910
            0.002        24.4774      0.0161409            131           1016           8135
            0.002        24.9873      0.0173199            139           1023           8175
            0.002        24.5166      0.0164551            160           1053           8425
            0.002        24.0483      0.0173115            115           1055           8448
            0.002        24.5662      0.0163306            119           1012           8100
            0.002        22.5131      0.0163115            136           1029           8221
            0.002        23.3858      0.0168627            171           1029           8229
            0.002        24.3451      0.0159375            128            988           7905
            0.002        24.5648      0.0167172            140           1018           8158
            0.002        24.0451      0.0169306            125           1065           8533
            0.002         22.232      0.0171949             95           1013           8116
            0.002        22.7726      0.0176708            125           1060           8482
            0.002        22.5884      0.0161472            105           1001           8009
            0.002        23.0564      0.0154802            139            975           7802
           0.0021         25.358      0.0175254            162           1123           8973
           0.0021        23.5216      0.0166113            102           1064           8505
           0.0021        25.6885      0.0175121            132           1085           8686
           0.0021        26.6605      0.0185205            155           1131           9038
           0.0021        27.2381      0.0181354            172           1088           8705
           0.0021        23.7835      0.0161055            162           1030           8246
           0.0021        25.4311      0.0172561            154           1053           8421
           0.0021        26.2897      0.0180697            145           1101           8818
           0.0021        24.9256      0.0177564            114           1048           8381
           0.0021        29.0895      0.0181915            238           1128           9023
           0.0021        23.8174      0.0187394            101           1106           8845
           0.0021         24.758      0.0179187            178           1128           9031
           0.0021        23.0282      0.0168484            123           1027           8222
           0.0021        24.2455      0.0170161            160           1055           8440
           0.0021        27.9505      0.0188791            136           1152           9213
           0.0021        24.2382      0.0177623            119           1083           8668
           0.0021        23.3362      0.0171895            117           1065           8526
           0.0021        26.8087      0.0181431            314           1124           8999
           0.0021        25.6046      0.0170117            188           1090           8710
           0.0021        22.9067      0.0164125            133            986           7878
           0.0022        24.6573      0.0178831            201           1109           8870
           0.0022         28.147       0.019375            255           1143           9145
           0.0022        25.3489      0.0180734            156           1138           9109
           0.0022        25.7289      0.0180873            138           1140           9116
           0.0022        24.3099      0.0180615            112           1139           9103
           0.0022        23.3651      0.0171984            105           1082           8668
           0.0022        26.6277      0.0186875            171           1120           8970
           0.0022        25.6816      0.0174043            174           1115           8911
           0.0022        25.0669      0.0183811            140           1121           8970
           0.0022        25.6191      0.0177778            183           1121           8960
           0.0022        26.6704      0.0179316            194           1147           9181
           0.0022         25.546       0.018375            110           1141           9114
           0.0022        23.9312      0.0174824            174           1119           8951
           0.0022        23.6465      0.0170298            161           1072           8583
           0.0022        25.1161       0.017625            139           1128           9024
           0.0022        27.6816      0.0185312            172           1187           9488
           0.0022         28.315      0.0187383            175           1200           9594
           0.0022        23.9885       0.017123            124           1045           8356
           0.0022        26.7866      0.0184453            156           1181           9444
           0.0022        25.3587      0.0176797            144           1132           9052
           0.0023        24.7287       0.018371            134           1139           9112
           0.0023        27.9079      0.0195176            178           1249           9993
           0.0023        28.2974       0.018416            177           1177           9429
           0.0023        28.1918      0.0190488            143           1220           9753
           0.0023        25.0035       0.018121            222           1141           9133
           0.0023        31.6292      0.0197111            210           1200           9619
           0.0023        26.0249      0.0182266            173           1167           9332
           0.0023        26.5329      0.0182637            164           1169           9351
           0.0023        26.7663      0.0194405            128           1224           9798
           0.0023        24.8961       0.019379            111           1203           9612
           0.0023        26.5131      0.0184199            209           1179           9431
           0.0023        28.1425      0.0188613            172           1207           9657
           0.0023        24.8171      0.0182734            116           1170           9356
           0.0023        27.3453      0.0180496            144           1138           9097
           0.0023        28.9407      0.0197897            156           1248           9974
           0.0023        25.4922      0.0191016            124           1221           9780
           0.0023        24.8484      0.0186988            154           1141           9125
           0.0023        26.2204      0.0193254            134           1216           9740
           0.0023        24.7767      0.0172891            138           1106           8852
           0.0023        26.3985       0.018168            154           1162           9302
           0.0024        29.0783      0.0210141            171           1302          10423
           0.0024        26.8913      0.0199324            143           1214           9727
           0.0024        28.1796      0.0191984            132           1208           9676
           0.0024        30.9822      0.0193242            192           1238           9894
           0.0024        26.9211      0.0187964            159           1166           9323
           0.0024        27.6496      0.0195595            151           1233           9858
           0.0024        29.3205      0.0196754            218           1220           9759
           0.0024        29.2228      0.0198627            169           1212           9693
           0.0024        28.0344      0.0192218            142           1192           9534
           0.0024        27.6385      0.0179531            223           1148           9192
           0.0024        30.0034       0.018625            172           1192           9536
           0.0024        27.5815      0.0196806            130           1240           9919
           0.0024        30.6438      0.0189683            189           1196           9560
           0.0024        24.8512      0.0181934            106           1163           9315
           0.0024        26.4466       0.018623            144           1171           9386
           0.0024         28.961      0.0196309            138           1258          10051
           0.0024        28.9595      0.0196071            160           1235           9882
           0.0024           30.6         0.0195            165           1230           9828
           0.0024        28.0513      0.0195159            151           1228           9836
           0.0024        27.7889      0.0205437            166           1293          10354
           0.0025        30.9767      0.0204504            211           1289          10307
           0.0025        26.0447      0.0191667            140           1207           9660
           0.0025        29.1691      0.0196905            205           1242           9924
           0.0025        30.6299      0.0213347            245           1324          10582
           0.0025        31.4459      0.0202817            213           1276          10222
           0.0025        55.9985       0.021754            422           1347          10790
           0.0025        29.2717      0.0205594            156           1255          10033
           0.0025        34.1807      0.0206777            326           1323          10587
           0.0025        27.0557      0.0200184            191           1221           9769
           0.0025        31.4347      0.0209028            163           1318          10535
           0.0025        29.7029      0.0215958            236           1296          10366
           0.0025        30.5109      0.0192812            257           1233           9872
           0.0025        28.4596      0.0195156            201           1249           9992
           0.0025        33.5247      0.0192758            291           1216           9715
           0.0025        28.2451      0.0199395            190           1236           9890
           0.0025        28.9076      0.0189028            186           1191           9527
           0.0025        30.5616      0.0201504            217           1291          10317
           0.0025        31.9359      0.0212897            196           1342          10730
           0.0025         29.192      0.0195332            194           1250          10001
           0.0025        28.1359        0.01975            175           1266          10112
           0.0026        31.4058       0.020881            217           1316          10524
           0.0026        30.8241       0.021121            206           1330          10645
           0.0026        29.6806      0.0215948            155           1340          10711
           0.0026        31.7469      0.0213086            206           1363          10910
           0.0026        31.5347      0.0204941            224           1311          10493
           0.0026        31.2587      0.0202617            306           1295          10374
           0.0026         32.783      0.0203948            186           1286          10279
           0.0026        32.7932      0.0206367            348           1320          10566
           0.0026        31.9348      0.0211706            178           1334          10670
           0.0026        39.3144      0.0209063            582           1336          10704
           0.0026        35.7442      0.0212837            368           1341          10727
           0.0026         30.211      0.0213829            166           1346          10777
           0.0026        34.1485      0.0205352            236           1313          10514
           0.0026        33.6273      0.0215371            222           1379          11027
           0.0026        34.8611      0.0211468            309           1332          10658
           0.0026        32.5958      0.0220957            179           1415          11313
           0.0026        32.4201       0.020879            222           1314          10523
           0.0026        28.7125      0.0196699            207           1259          10071
           0.0026        32.4336      0.0213929            254           1347          10782
           0.0026        29.5602      0.0210774            175           1328          10623
           0.0027         32.294      0.0214785            233           1374          10997
           0.0027        32.3663      0.0213418            209           1365          10927
           0.0027        32.3806      0.0210547            204           1348          10780
           0.0027         39.231      0.0226602            295           1450          11602
           0.0027        35.2476      0.0207793            337           1329          10639
           0.0027        36.3363      0.0215754            218           1359          10874
           0.0027         33.496      0.0216445            251           1387          11082
           0.0027        41.3898      0.0232598            369           1488          11909
           0.0027        42.1596      0.0220391            338           1410          11284
           0.0027        31.1256      0.0211465            222           1353          10827
           0.0027        32.6679      0.0212168            194           1358          10863
           0.0027         37.522       0.022375            335           1410          11277
           0.0027        32.7959      0.0212148            249           1357          10862
           0.0027        41.9661      0.0225508            291           1444          11546
           0.0027        32.5364      0.0226925            202           1430          11437
           0.0027        35.6549      0.0208496            451           1333          10675
           0.0027        32.1356      0.0212383            275           1357          10874
           0.0027        28.8955      0.0219824            249           1407          11255
           0.0027         32.264      0.0217738            175           1371          10974
           0.0027        37.4629      0.0220801            274           1415          11305
           0.0028        38.4442      0.0224121            352           1434          11475
           0.0028        31.7527      0.0219821            160           1383          11079
           0.0028        33.4075      0.0216133            246           1384          11066
           0.0028        35.8184      0.0224008            253           1410          11290
           0.0028        39.5865      0.0224841            393           1417          11332
           0.0028        40.6097       0.023873            312           1504          12032
           0.0028        46.8498      0.0235833            400           1485          11886
           0.0028        33.6073      0.0222246            294           1421          11379
           0.0028        30.6907      0.0221562            194           1416          11344
           0.0028        49.5167      0.0229687            540           1469          11760
           0.0028        38.0098      0.0226905            252           1428          11436
           0.0028        39.8502      0.0225293            317           1442          11535
           0.0028        35.5274       0.022248            306           1424          11391
           0.0028         36.278      0.0230476            317           1453          11616
           0.0028        33.1769      0.0220781            223           1413          11304
           0.0028        37.7661       0.024123            227           1518          12158
           0.0028        44.5529      0.0235754            414           1485          11882
           0.0028        33.1877      0.0227641            310           1412          11291
           0.0028        35.5954      0.0227242            274           1431          11453
           0.0028        35.4613      0.0223313            311           1407          11255
           0.0029        47.5576      0.0240156            479           1537          12296
           0.0029        38.9267      0.0232305            201           1487          11894
           0.0029        48.3907      0.0231758            530           1482          11866
           0.0029        36.4445      0.0226953            200           1451          11620
           0.0029        43.4057      0.0229375            491           1469          11744
           0.0029        35.7236      0.0226895            284           1451          11617
           0.0029         36.802      0.0218086            266           1394          11166
           0.0029        41.0048      0.0226367            721           1447          11590
           0.0029        35.9097      0.0235746            224           1461          11693
           0.0029        40.4635      0.0243532            230           1536          12274
           0.0029        45.4411       0.024625            403           1503          12017
           0.0029        34.6398      0.0225273            251           1441          11534
           0.0029        46.6658      0.0240078            416           1535          12292
           0.0029        37.3668      0.0213574            230           1366          10935
           0.0029        35.6914      0.0226726            245           1429          11427
           0.0029        35.0154      0.0223398            232           1428          11438
           0.0029        37.9974      0.0239063            370           1530          12240
           0.0029        42.2596      0.0228155            493           1437          11499
           0.0029        60.1248      0.0240313            740           1538          12304
           0.0029        36.6256      0.0230586            242           1477          11806
            0.003        52.5356      0.0241602            702           1546          12370
            0.003        45.8319      0.0236367            365           1511          12102
            0.003        37.9638      0.0244899            243           1520          12147
            0.003        44.6692      0.0245996            377           1575          12595
            0.003        48.5608      0.0246777            447           1578          12635
            0.003        37.9462      0.0233075            297           1469          11747
            0.003        36.7682      0.0236113            276           1510          12089
            0.003        54.1432      0.0236465            677           1515          12107
            0.003        49.4803      0.0238145            712           1524          12193
            0.003        42.8887      0.0245218            288           1546          12359
            0.003        46.7378      0.0240781            329           1541          12328
            0.003        36.3196      0.0238418            247           1527          12207
            0.003        40.8674      0.0242949            342           1553          12439
            0.003        52.0526      0.0256885            462           1617          12947
            0.003         40.242      0.0237937            376           1500          11992
            0.003        41.2323      0.0242044            252           1524          12199
            0.003        39.0682      0.0235977            247           1510          12082
            0.003        41.1346      0.0239444            337           1508          12068
            0.003        42.5398      0.0239473            351           1532          12261
            0.003         46.596      0.0240039            378           1537          12290
           0.0031        69.9883      0.0267227            461           1713          13682
           0.0031         65.862      0.0250273            937           1602          12814
           0.0031        61.7964      0.0255215            769           1631          13067
           0.0031         43.179      0.0240039            280           1536          12290
           0.0031         52.066      0.0248125            945           1590          12704
           0.0031        48.4232      0.0244414            297           1562          12514
           0.0031        51.3064      0.0247302            740           1557          12464
           0.0031        58.8361      0.0246885            770           1556          12443
           0.0031        44.9665      0.0251719            327           1611          12888
           0.0031        59.4145      0.0248891            472           1544          12345
           0.0031        53.0091      0.0239199            524           1532          12247
           0.0031        40.1233      0.0245918            222           1573          12591
           0.0031        48.9445      0.0242956            423           1531          12245
           0.0031        41.9274      0.0240996            404           1542          12339
           0.0031        49.5411      0.0252988            685           1619          12953
           0.0031        50.3912      0.0251328            479           1608          12868
           0.0031        49.0581      0.0246996            899           1532          12251
           0.0031        51.9847      0.0248492            347           1566          12524
           0.0031        50.7453      0.0250723            440           1606          12837
           0.0031        47.7127      0.0250833            535           1580          12642
           0.0032        66.7315      0.0258968            803           1631          13052
           0.0032        50.3433      0.0265417            340           1672          13377
           0.0032        50.1937       0.025916            387           1657          13269
           0.0032        49.4764      0.0262641            445           1629          13027
           0.0032        47.6014      0.0247363            480           1583          12665
           0.0032        47.9338      0.0257305            464           1646          13174
           0.0032        60.3211      0.0258965           1115           1657          13259
           0.0032         48.344         0.0255            447           1631          13056
           0.0032        78.0314      0.0272659            733           1718          13742
           0.0032        62.8852      0.0255898            701           1638          13102
           0.0032        51.2859      0.0255625            896           1637          13088
           0.0032        44.3933      0.0253359            255           1622          12972
           0.0032         49.192      0.0248965            720           1594          12747
           0.0032         48.703       0.025832            570           1653          13226
           0.0032        107.159      0.0259043           1317           1658          13263
           0.0032        49.8303      0.0255918            357           1638          13103
           0.0032        55.1506      0.0253379            738           1620          12973
           0.0032        42.2673      0.0247773            268           1586          12686
           0.0032        60.0972      0.0263828            454           1688          13508
           0.0032        52.2831          0.026            546           1664          13312
           0.0033        66.1426      0.0262695            576           1683          13450
           0.0033         58.572      0.0255714            607           1610          12888
           0.0033        53.8492       0.026625            410           1704          13632
           0.0033        52.8023      0.0264028            385           1664          13307
           0.0033        58.6677      0.0264199            461           1691          13527
           0.0033        58.6947      0.0261484           1160           1674          13388
           0.0033        60.5969      0.0265273            673           1697          13582
           0.0033        53.3824      0.0259883            636           1663          13306
           0.0033        75.2949      0.0268477            814           1719          13746
           0.0033        131.294      0.0276567           1616           1741          13939
           0.0033        58.3959      0.0262123            617           1652          13211
           0.0033        55.4404      0.0258496            414           1653          13235
           0.0033        74.8692      0.0270996            646           1735          13875
           0.0033        84.3005      0.0269375           1124           1724          13792
           0.0033        78.4877      0.0271548            862           1710          13686
           0.0033        50.7558       0.026125            305           1671          13376
           0.0033        56.7548      0.0260508            416           1668          13338
           0.0033        143.407      0.0273145           2898           1749          13985
           0.0033        55.0904      0.0264219            724           1692          13528
           0.0033        137.687      0.0275059           1359           1760          14083
           0.0034        63.0989      0.0265137           1179           1698          13575
           0.0034        120.011      0.0277441           2216           1776          14205
           0.0034        78.1838      0.0268633            899           1719          13754
           0.0034        98.8615      0.0283984            748           1819          14540
           0.0034        51.4931      0.0260488            384           1669          13337
           0.0034         71.828      0.0269902            869           1727          13819
           0.0034        112.307      0.0277109           1984           1773          14188
           0.0034        109.871      0.0275918           1674           1764          14127
           0.0034        103.239      0.0267324           1359           1711          13687
           0.0034          116.7      0.0277852           2585           1778          14226
           0.0034        75.1557       0.027498            518           1760          14079
           0.0034        117.636      0.0271016           1448           1735          13876
           0.0034        59.5632      0.0266934            384           1708          13667
           0.0034        81.5214      0.0273945            895           1753          14026
           0.0034        57.6497      0.0271925            485           1713          13705
           0.0034        66.6482      0.0273145            631           1748          13985
           0.0034        79.4965       0.027496            924           1732          13858
           0.0034        65.7302       0.026832            495           1716          13738
           0.0034        117.153      0.0278313           1330           1754          14027
           0.0034        84.1776      0.0266426           1038           1706          13641
           0.0035        73.4694      0.0273652           1028           1751          14011
           0.0035        137.814      0.0281387           1823           1802          14407
           0.0035        86.6123       0.026998            883           1728          13823
           0.0035        136.442      0.0279277           1994           1788          14299
           0.0035        138.664      0.0280625           2201           1796          14368
           0.0035        63.6515      0.0274961            783           1762          14078
           0.0035        122.422       0.027791           1596           1779          14229
           0.0035        118.827      0.0268691           1496           1719          13757
           0.0035        243.244      0.0282578           3961           1806          14468
           0.0035        90.7259      0.0271738           1162           1740          13913
           0.0035        94.1442       0.027377           1094           1727          13798
           0.0035        85.8683      0.0272949           1147           1746          13975
           0.0035        113.745       0.027168           1942           1739          13910
           0.0035        126.849      0.0280293           1265           1793          14351
           0.0035        131.448      0.0277813           1953           1780          14224
           0.0035        76.2784      0.0277341            755           1749          13978
           0.0035        123.961      0.0282813           1250           1810          14480
           0.0035        103.712      0.0269805           1666           1728          13814
           0.0035         118.15      0.0274609           2464           1759          14060
           0.0035        107.986      0.0284395            982           1820          14561
           0.0036        245.074      0.0281348           3616           1801          14405
           0.0036        165.473      0.0281367           2721           1802          14406
           0.0036        166.596      0.0281777           1527           1804          14427
           0.0036        196.021      0.0283496           5274           1817          14515
           0.0036        144.851      0.0287222           1951           1810          14476
           0.0036        173.242      0.0284316           1983           1820          14557
           0.0036        141.284      0.0279668           1895           1790          14319
           0.0036        193.112      0.0283223           3412           1813          14501
           0.0036        111.724      0.0282402           1530           1808          14459
           0.0036        198.968      0.0291543           3032           1866          14927
           0.0036        224.036      0.0287793           3835           1841          14735
           0.0036        143.809      0.0288223           1743           1845          14757
           0.0036        187.169      0.0286389           2150           1806          14434
           0.0036        155.231      0.0286152           3116           1832          14651
           0.0036        157.546      0.0288145           1709           1844          14753
           0.0036         218.58      0.0291172           2003           1863          14908
           0.0036        260.503      0.0278945           4521           1784          14282
           0.0036        200.804      0.0289043           2015           1851          14799
           0.0036        166.071      0.0282718           2616           1781          14249
           0.0036         106.36      0.0280605           1010           1794          14367
];

rows = size(data, 1);
cols = size(data, 2);

data_delay = [];
for i = 1:rows/20,
   ifirst = (i - 1) * 20 + 1;
   ilast  = ifirst + 20 - 1;
   tmp = data(ifirst:ilast, cols-5+1);
   avg = mean(tmp);
   [h sig ci] = ttest(tmp, 0.1);
   ci = (ci(2)-ci(1))/2;
   data_delay = [data_delay; data(ifirst, 1:cols-5), avg ci];
end

figure(1);
hold on;
plot(data_delay(:,1), data_delay(:,2), symbol);

data_throughput = [];
for i = 1:rows/20,
   ifirst = (i - 1) * 20 + 1;
   ilast  = ifirst + 20 - 1;
   tmp = data(ifirst:ilast, cols-5+2);
   avg = mean(tmp);
   [h sig ci] = ttest(tmp, 0.1);
   ci = (ci(2)-ci(1))/2;
   data_throughput = [data_throughput; data(ifirst, 1:cols-5), avg ci];
end

figure(2);
hold on;
plot(data_throughput(:,1), data_throughput(:,2), symbol);

data_maxdelay = [];
for i = 1:rows/20,
   ifirst = (i - 1) * 20 + 1;
   ilast  = ifirst + 20 - 1;
   tmp = data(ifirst:ilast, cols-5+3);
   avg = mean(tmp);
   [h sig ci] = ttest(tmp, 0.1);
   ci = (ci(2)-ci(1))/2;
   data_maxdelay = [data_maxdelay; data(ifirst, 1:cols-5), avg ci];
end

figure(3);
hold on;
plot(data_maxdelay(:,1), data_maxdelay(:,2), symbol);


%-------- Saturation Analysis -----------
slope=[];
for i=2:size(data_throughput,1),
    slope(i-1) = (data_throughput(i,2)-data_throughput(i-1,2))/(data_throughput(i,1)-data_throughput(i-1,1));
end

for i=2:size(slope,2),
    if slope(i) < (0.95*mean(slope(1:i)))
        max_pir = data_throughput(i, 1);
        max_throughput = data_throughput(i, 2);
        min_delay = data_delay(i, 2);
        break;
    end
end
